package com.jz;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by Hasee on 2022-03-03.
 */
@Mapper
public interface TestMapper {
//    @Select("select * from user")
//    List<UserVo> queryUser();
//
//    @Insert("insert into user values(#{id},#{name})")
//    int insertUser(UserVo userVo);

    @Insert("insert into user(id,uid,name,age,addressName) values(#{id},#{aid},#{name},#{age},#{addressName})")
    int insertUser(UserVo userVo);

    @Select("select * from user order by id desc")
    List<UserVo> selectAll();

    @Insert("insert into address(aid,name) values(#{aid},#{name})")
    int addAddress(AddressVo addressVo);
}
